/**
* @Description: 地图
* @Author: 王燕欣
* @Date: 2024-09-25 17:17
*/
import TileLayer from "ol/layer/Tile";
import { XYZ } from "ol/source";
let googleMapLine = {
  initMapLayer: function () {
    console.log('离线地图--成功--w---->')
    let mapLayer = new TileLayer({
      id: 'baseLayer',
      source: new XYZ({
        headers: {
          'Access-Control-Allow-Origin': '*',
          'Accept': 'image/png'
        },
        // url:"http://www.google.com/maps/vt/pb=!1m4!1m3!1i{z}!2i{x}!3i{y}!2m3!1e0!2sm!3i345013117!3m8!2szh-CN!3scn!5e1105!12m4!1e68!2m2!1sset!2sRoadmap!4e0",
        url: window.MAPSETTINGS.MAPTILEURL,
        crossOrigin: 'anonymous',
      })
    });
    return mapLayer;
  },
}
export default googleMapLine;
